package com.yw.controller;

import com.yw.result.R;
import com.yw.service.CityService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Tag(name = "城市管理",description = "城市管理")
@RequestMapping("/city")
public class CityController {
    @Resource
    private CityService cityService;

    @Operation(summary = "查询所有城市",description = "查询所有城市")
    @PostMapping("/getAllCity")
    public R getAllCity(){
        return R.OK(cityService.list());
    }
}
